package edu.ujf.sharepas.rcp;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

public class Perspective implements IPerspectiveFactory {

	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);
		
	
		layout.addStandaloneView(NavigationView.ID,  true,  IPageLayout.TOP | IPageLayout.LEFT , 0.80f, editorArea);
		layout.addStandaloneView(UsersView.ID, true, IPageLayout.BOTTOM | IPageLayout.LEFT , 0.15f, editorArea);
		layout.addStandaloneView(ChatView.ID, true, IPageLayout.BOTTOM | IPageLayout.RIGHT, 0.85f, editorArea);
		
		
	
		/*IFolderLayout folder = layout.createFolder("messages", IPageLayout.BOTTOM, 0.2f, editorArea);
		folder.addPlaceholder(View.ID + ":*");
		folder.addView(View.ID);*/
		
		layout.getViewLayout(ChatView.ID).setCloseable(true);
		layout.getViewLayout(UsersView.ID).setCloseable(true);
		layout.getViewLayout(NavigationView.ID).setCloseable(true);
	}
}
